﻿using System.Windows;
using SvgViewer.Utilities;

namespace SvgViewer;

/// <summary>
/// App.xaml 的交互逻辑
/// </summary>
public partial class App 
{
    /// <summary>
    /// 初始操作
    /// </summary>
    /// <param name="e"></param>
    protected override void OnStartup(StartupEventArgs e)
    {
        base.OnStartup(e);
        var lang = SvgViewer.Properties.Settings.Default.Language;
        if (lang != 0)
        {
            LanguageManager.Instance.ChangeLanguage((Languages)lang);
        }

        ThemeManager.Instance.ColorIndex = SvgViewer.Properties.Settings.Default.ColorIndex;
        ThemeManager.Instance.IsDark     = SvgViewer.Properties.Settings.Default.IsDark;
    }
}